<?php 
		namespace Admin\Model;
		use Think\Model;
		class CateModel extends Model	{
			protected $tableName = 'cate';
		
			
			
			//得到栏目信息
			public function get_cate(){
				$data=S("cateinfo");
				if(empty($data)){
					$sql="SELECT
							think_cate.*,
							think_model.`name` as model_name,
							think_model.`table`,
							think_model.`show`
							FROM
							think_cate
							INNER JOIN think_model ON think_cate.model_id = think_model.id order by think_cate.listorder asc";
					$data = arr_rule($this->query($sql));
					
					S("cateinfo",$data);
				}
					
				return $data;
				
			}
			
		}


?>